package com.hzsparrow.business.base.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hzsparrow.business.base.validgroups.Create;
import com.hzsparrow.business.base.validgroups.Edit;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

public class HzsUser implements Serializable {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.hsu_id
     *
     * @mbg.generated
     */
    @NotBlank(groups = Edit.class, message = "用户ID不可为空！")
    private String hsuId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.hsu_name
     *
     * @mbg.generated
     */
    @NotBlank(message = "用户姓名不可为空！")
    @Length(max = 20, message = "用户姓名过长，不应超过20个字符！")
    private String hsuName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.hsu_account
     *
     * @mbg.generated
     */
    @NotBlank(message = "用户账号不可为空！")
    @Length(max = 20, message = "用户账号过长，不应超过20个字符！")
    private String hsuAccount;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.hsu_password
     *
     * @mbg.generated
     */
    @JsonIgnore
    @NotBlank(groups = Create.class, message = "用户密码不可为空！")
    @Length(max = 20, message = "用户密码过长，不应超过20个字符！")
    private String hsuPassword;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.hsr_id
     *
     * @mbg.generated
     */
    @NotBlank(message = "用户角色ID不可为空！")
    private String hsrId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.email
     *
     * @mbg.generated
     */
    private String email;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.mobile
     *
     * @mbg.generated
     */
    private String mobile;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.img_id
     *
     * @mbg.generated
     */
    private String imgId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.delete_flag
     *
     * @mbg.generated
     */
    @JsonIgnore
    private Integer deleteFlag;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.crt_id
     *
     * @mbg.generated
     */
    private String crtId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.crt_name
     *
     * @mbg.generated
     */
    private String crtName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.crt_time
     *
     * @mbg.generated
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date crtTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.mdf_id
     *
     * @mbg.generated
     */
    private String mdfId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.mdf_name
     *
     * @mbg.generated
     */
    private String mdfName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hzs_user.mdf_time
     *
     * @mbg.generated
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date mdfTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table hzs_user
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.hsu_id
     *
     * @return the value of hzs_user.hsu_id
     * @mbg.generated
     */
    public String getHsuId() {
        return hsuId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.hsu_id
     *
     * @param hsuId the value for hzs_user.hsu_id
     * @mbg.generated
     */
    public void setHsuId(String hsuId) {
        this.hsuId = hsuId == null ? null : hsuId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.hsu_name
     *
     * @return the value of hzs_user.hsu_name
     * @mbg.generated
     */
    public String getHsuName() {
        return hsuName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.hsu_name
     *
     * @param hsuName the value for hzs_user.hsu_name
     * @mbg.generated
     */
    public void setHsuName(String hsuName) {
        this.hsuName = hsuName == null ? null : hsuName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.hsu_account
     *
     * @return the value of hzs_user.hsu_account
     * @mbg.generated
     */
    public String getHsuAccount() {
        return hsuAccount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.hsu_account
     *
     * @param hsuAccount the value for hzs_user.hsu_account
     * @mbg.generated
     */
    public void setHsuAccount(String hsuAccount) {
        this.hsuAccount = hsuAccount == null ? null : hsuAccount.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.hsu_password
     *
     * @return the value of hzs_user.hsu_password
     * @mbg.generated
     */
    public String getHsuPassword() {
        return hsuPassword;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.hsu_password
     *
     * @param hsuPassword the value for hzs_user.hsu_password
     * @mbg.generated
     */
    public void setHsuPassword(String hsuPassword) {
        this.hsuPassword = hsuPassword == null ? null : hsuPassword.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.hsr_id
     *
     * @return the value of hzs_user.hsr_id
     * @mbg.generated
     */
    public String getHsrId() {
        return hsrId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.hsr_id
     *
     * @param hsrId the value for hzs_user.hsr_id
     * @mbg.generated
     */
    public void setHsrId(String hsrId) {
        this.hsrId = hsrId == null ? null : hsrId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.email
     *
     * @return the value of hzs_user.email
     * @mbg.generated
     */
    public String getEmail() {
        return email;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.email
     *
     * @param email the value for hzs_user.email
     * @mbg.generated
     */
    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.mobile
     *
     * @return the value of hzs_user.mobile
     * @mbg.generated
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.mobile
     *
     * @param mobile the value for hzs_user.mobile
     * @mbg.generated
     */
    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.img_id
     *
     * @return the value of hzs_user.img_id
     * @mbg.generated
     */
    public String getImgId() {
        return imgId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.img_id
     *
     * @param imgId the value for hzs_user.img_id
     * @mbg.generated
     */
    public void setImgId(String imgId) {
        this.imgId = imgId == null ? null : imgId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.delete_flag
     *
     * @return the value of hzs_user.delete_flag
     * @mbg.generated
     */
    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.delete_flag
     *
     * @param deleteFlag the value for hzs_user.delete_flag
     * @mbg.generated
     */
    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.crt_id
     *
     * @return the value of hzs_user.crt_id
     * @mbg.generated
     */
    public String getCrtId() {
        return crtId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.crt_id
     *
     * @param crtId the value for hzs_user.crt_id
     * @mbg.generated
     */
    public void setCrtId(String crtId) {
        this.crtId = crtId == null ? null : crtId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.crt_name
     *
     * @return the value of hzs_user.crt_name
     * @mbg.generated
     */
    public String getCrtName() {
        return crtName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.crt_name
     *
     * @param crtName the value for hzs_user.crt_name
     * @mbg.generated
     */
    public void setCrtName(String crtName) {
        this.crtName = crtName == null ? null : crtName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.crt_time
     *
     * @return the value of hzs_user.crt_time
     * @mbg.generated
     */
    public Date getCrtTime() {
        return crtTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.crt_time
     *
     * @param crtTime the value for hzs_user.crt_time
     * @mbg.generated
     */
    public void setCrtTime(Date crtTime) {
        this.crtTime = crtTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.mdf_id
     *
     * @return the value of hzs_user.mdf_id
     * @mbg.generated
     */
    public String getMdfId() {
        return mdfId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.mdf_id
     *
     * @param mdfId the value for hzs_user.mdf_id
     * @mbg.generated
     */
    public void setMdfId(String mdfId) {
        this.mdfId = mdfId == null ? null : mdfId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.mdf_name
     *
     * @return the value of hzs_user.mdf_name
     * @mbg.generated
     */
    public String getMdfName() {
        return mdfName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.mdf_name
     *
     * @param mdfName the value for hzs_user.mdf_name
     * @mbg.generated
     */
    public void setMdfName(String mdfName) {
        this.mdfName = mdfName == null ? null : mdfName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hzs_user.mdf_time
     *
     * @return the value of hzs_user.mdf_time
     * @mbg.generated
     */
    public Date getMdfTime() {
        return mdfTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hzs_user.mdf_time
     *
     * @param mdfTime the value for hzs_user.mdf_time
     * @mbg.generated
     */
    public void setMdfTime(Date mdfTime) {
        this.mdfTime = mdfTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hzs_user
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", hsuId=").append(hsuId);
        sb.append(", hsuName=").append(hsuName);
        sb.append(", hsuAccount=").append(hsuAccount);
        sb.append(", hsuPassword=").append(hsuPassword);
        sb.append(", hsrId=").append(hsrId);
        sb.append(", email=").append(email);
        sb.append(", mobile=").append(mobile);
        sb.append(", imgId=").append(imgId);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", crtId=").append(crtId);
        sb.append(", crtName=").append(crtName);
        sb.append(", crtTime=").append(crtTime);
        sb.append(", mdfId=").append(mdfId);
        sb.append(", mdfName=").append(mdfName);
        sb.append(", mdfTime=").append(mdfTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}